bitkeeper revision 1.1159.1.467 (41a8a92fuqr-8LJEPkwzjOoNHx4F7Q)
authorcl349@arcadians.cl.cam.ac.uk <cl349@arcadians.cl.cam.ac.uk>
Sat, 27 Nov 2004 16:19:59 +0000 (16:19 +0000)
committercl349@arcadians.cl.cam.ac.uk <cl349@arcadians.cl.cam.ac.uk>
Sat, 27 Nov 2004 16:19:59 +0000 (16:19 +0000)
sync w/ head.

1  2 
linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S
xen/arch/x86/traps.c
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_32/seg_fixup.c
xen/include/public/xen.h

index 74b166acf1f5b2831b5c325ff244220eef05b25b,842de24582d532e57cef05fd9c621af168b1f1f7..0747723f38939f607cc449e7383dd886d058fc63
@@@ -428,10 -421,10 +430,10 @@@ asmlinkage int do_page_fault(struct xen
              return EXCRET_fault_fixed; /* successfully copied the mapping */
      }
  
-     if ( unlikely(!(regs->cs & 3)) )
+     if ( !GUEST_FAULT(regs) )
          goto xen_fault;
  
 -    ti = d->thread.traps + 14;
 +    ti = ed->thread.traps + 14;
      tb->flags = TBF_EXCEPTION | TBF_EXCEPTION_ERRCODE | TBF_EXCEPTION_CR2;
      tb->cr2        = addr;
      tb->error_code = regs->error_code;
index 637140413a9bf6c84290e7b5af036a8ff983efd8,4bfcb945d34203bbc500bd15313381a87eb03694..98dc284ca475ac81843186f23c23080477efdb7e
@@@ -71,8 -71,10 +71,10 @@@ ENTRY(continue_nonidle_task
  
          ALIGN
  restore_all_guest:
 -        testb $TF_failsafe_return,DOMAIN_thread_flags(%ebx)
 +        testb $TF_failsafe_return,EDOMAIN_thread_flags(%ebx)
          jnz  failsafe_callback
+         testl $X86_EFLAGS_VM,XREGS_eflags(%esp)
+         jnz  restore_all_vm86
  FLT1:   movl XREGS_ds(%esp),%ds
  FLT2:   movl XREGS_es(%esp),%es
  FLT3:   movl XREGS_fs(%esp),%fs
@@@ -218,12 -221,13 +221,13 @@@ process_softirqs
  /*   {EIP, CS, EFLAGS, [ESP, SS]}                                        */
  /* %edx == trap_bounce, %ebx == task_struct                              */
  /* %eax,%ecx are clobbered. %gs:%esi contain new XREGS_ss/XREGS_esp. */
- create_bounce_frame:        
+ create_bounce_frame:
+         movl XREGS_eflags+4(%esp),%ecx
          movb XREGS_cs+4(%esp),%cl
-         testb $2,%cl
-         jz   1f /* jump if returning to an existing ring-1 activation */
+         testl $(2|X86_EFLAGS_VM),%ecx
+         jz   ring1 /* jump if returning to an existing ring-1 activation */
          /* obtain ss/esp from TSS -- no current ring-1 activations */
 -        movl DOMAIN_processor(%ebx),%eax
 +        movl EDOMAIN_processor(%ebx),%eax
          /* next 4 lines multiply %eax by 8320, which is sizeof(tss_struct) */
          movl %eax, %ecx
          shll $7, %ecx
@@@ -588,7 -670,7 +670,8 @@@ ENTRY(hypercall_table
          .long SYMBOL_NAME(do_grant_table_op)     /* 20 */
          .long SYMBOL_NAME(do_vm_assist)
          .long SYMBOL_NAME(do_update_va_mapping_otherdomain)
+         .long SYMBOL_NAME(do_switch_vm86)
 +        .long SYMBOL_NAME(do_boot_vcpu)
          .rept NR_hypercalls-((.-hypercall_table)/4)
          .long SYMBOL_NAME(do_ni_hypercall)
          .endr
Simple merge
index 2ec859f8d5368252e2f64e0560dd8606773563dd,905bd4c0119fd6b686f8a434007000b5df6674be..89191ee6dcda8f0830ee3cc85a486364824612f4
@@@ -48,7 -48,7 +48,8 @@@
  #define __HYPERVISOR_grant_table_op       20
  #define __HYPERVISOR_vm_assist            21
  #define __HYPERVISOR_update_va_mapping_otherdomain 22
- #define __HYPERVISOR_boot_vcpu            23
+ #define __HYPERVISOR_switch_vm86          23
++#define __HYPERVISOR_boot_vcpu            24
  
  /*
   * MULTICALLS